package util

import (
	"log"
	"os"
)

var Logger *log.Logger

func InitLogger() {
	file, err := os.OpenFile("./opt/newletter-subs.log", os.O_CREATE|os.O_WRONLY|os.O_APPEND, os.ModePerm)
	if err != nil {
		log.Fatalln(err)
	}
	Logger = log.New(file, "", log.LstdFlags|log.Llongfile)
	Logger.Println("Logger Init Success!")
}
